package org.lds.ers.server.model;

import java.util.Date;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import com.google.appengine.api.users.User;

//代表一個支會物件
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Ward {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long id;

    @Persistent
    private String wardName; //支會名稱

    @Persistent
    private String wardNo;	//支會代碼

    @Persistent
    private Long stakeID; //所屬支聯會編號
    
    @Persistent
    private String remark;  

    @Persistent
    private Date lastUpdate;	//最後修改時間
    
    @Persistent
    private String byWhom;	//由誰修改
    
    @Persistent
    private Stake stake;
    
    
    public Stake getStake() {
		return stake;
	}

	public void setStake(Stake stake) {
		this.stake = stake;
	}

	public Ward(String wardName, String wardNo,Long stakeID, String remark, Date lastUpdate, String byWhom) {
        this.wardName = wardName;
        this.wardNo = wardNo;
        this.stakeID = stakeID;
        this.remark = remark;
        this.lastUpdate = lastUpdate;
        this.byWhom = byWhom;
    }

    public Long getId() {
        return id;
    }

    public Long getStakeID() {
        return this.stakeID;
    }
    
    public String getWardName()
    {
    	return this.wardName ;
    }
    
    public String getWardNo()
    {
    	return this.wardNo ;
    }
    
    public String getRemark()
    {
    	return this.remark ;
    }
    
    public Date getLastUpdate()
    {
    	return this.lastUpdate ;
    }
    
    public String getByWhom()
    {
    	return this.byWhom ;
    }
    
    public void setID(Long id)
    {
    	this.id = id ;
    }

    public void setStakeID(Long stakeID)
    {
    	this.stakeID = stakeID ;
    }
    
    public void setWardName(String wardName)
    {
    	this.wardName = wardName ;
    }
    
    public void setStakeNo(String wardNo)
    {
    	this.wardNo = wardNo;
    }
    
    public void setRemark(String remark)
    {
    	this.remark = remark;
    }
    
    public void setLastUpdate(Date lastUpdate)
    {
    	this.lastUpdate = lastUpdate ;
    }
    
    public void setByWhom(String byWhom)
    {
    	this.byWhom = byWhom;
    }
    
}
